<!--
 * Created by PhpStorm.
 * 版权所有: 2019~2022 [ hhygyl ]
 * Date: 2019/7/5-17:02
 * Link: http://luckyadmin.luckyhhy.cn
 * FileName: add_member.html
 *-->

{include file="public/open_head" /}

<div class="ok-body">

    <div class="layui-fluid">
        <div class="layui-card">

            <div class="layui-card-body" style="padding: 15px;">
                <div class="layui-form">

                    <div class="layui-form-item">
                        <label class="layui-form-label">所属角色：</label>
                        <div class="layui-input-block">

                            {:widget('forms/singleSelect',array('role_id|2|所属角色|title_show|id',$tree,0))}

                        </div>
                    </div>

                    {:token()}


                    {lv:inputform  label="管理员昵称：" name="nickname" place="请输入管理员昵称" verify="required"}


                    <div class="layui-form-item">
                        <label class="layui-form-label">用户名：</label>
                        <div class="layui-input-inline input-custom-width">
                            {lv:input name="username" place="请输入管理员用户名" verify="required"}

                        </div>
                        <label class="layui-form-label">密码：</label>
                        <div class="layui-input-inline input-custom-width">
                            {lv:input name="password" place="请输入管理员密码" verify="required" type="password"}
                        </div>
                    </div>


                    <div class="layui-form-item">
                        <label class="layui-form-label">手机号：</label>
                        <div class="layui-input-inline input-custom-width">
                            {lv:input name="phone" place="请输入手机号" verify="required|phone" }

                        </div>
                        <label class="layui-form-label">邮箱：</label>
                        <div class="layui-input-inline input-custom-width">
                            {lv:input name="email" place="请输入邮箱" verify="" }
                        </div>
                    </div>


                    <div class="layui-form-item">
                        <label class="layui-form-label">性别：</label>
                        <div class="layui-input-inline">
                            <select name="sex" lay-verify="required" >
                                <option value="男" >男</option>
                                <option value="女" >女</option>
                                <option value="保密" >保密</option>
                            </select>
                        </div>

                        <label class="layui-form-label">状态：</label>
                        <div class="layui-input-inline input-custom-width">
                            <input type="radio" name="status" value="1" title="正常" lay-filter=""  checked>
                            <input type="radio" name="status" value="2" title="拉黑" lay-filter="" >
                        </div>

                        <div class="layui-form-mid layui-word-aux"></div>
                    </div>


                    {:widget('forms/Upthumb',array('avatar|头像|管理员用户头像|required|选择图片','',150,150,1))}


                    {:widget('forms/submit',array('add','立即提交'))}




                </div>
            </div>
        </div>
    </div>


</div>




<script>
    layui.use(['element', 'form', 'jquery','lucky'], function () {
        var element = layui.element;
        var table = layui.table;
        var form = layui.form;
        var $ = layui.jquery;
        var lucky=layui.lucky;

        /**
         * 提交表单数据
         */
        form.on('submit(add)', function (data) {
            lucky.FormSubmit("{:url('adminmember/AddMember')}",data.field,"tableFilter",1);
            return false;
        });
    })
</script>


</body>
</html>
